home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
web
/
spiderweb
/
bug-reports
< prev
next >
Wrap
Internet Message Format
|
1990-09-10
|
75KB
From chase@orc.olivetti.com Thu Apr 6 16:11:45 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA24139; Thu, 6 Apr 89 16:11:43 EDT
Received: from NET.BIO.NET by Princeton.EDU (5.58+++/2.6)
id AA12881; Thu, 6 Apr 89 16:11:18 EDT
Received: from orc.olivetti.com by net.bio.net (5.59/1.15) with UUCP
id AA09769; Thu, 6 Apr 89 13:10:52 PDT
Received: from ozona.orc.olivetti.com by orc.olivetti.com (3.2/SMI-3.2)
id AA14880; Thu, 6 Apr 89 12:31:15 PDT
Received: by ozona.orc.olivetti.com (3.2/SMI-3.2)
id AA06589; Thu, 6 Apr 89 12:40:52 PDT
From: chase@orc.olivetti.com (David Chase)
Message-Id: <8904061940.AA06589@ozona.orc.olivetti.com>
To: nr@Princeton.EDU
Subject: "cputype?"
Reply-To: David Chase <chase@orc.olivetti.com>
Date: Thu, 06 Apr 89 12:40:50 -0700
Status: RO
is not a command on my Unix machine (a Sun).
David
From chase@orc.olivetti.com Thu Apr 6 16:11:56 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA24169; Thu, 6 Apr 89 16:11:53 EDT
Received: from NET.BIO.NET by Princeton.EDU (5.58+++/2.6)
id AA12880; Thu, 6 Apr 89 16:11:17 EDT
Received: from orc.olivetti.com by net.bio.net (5.59/1.15) with UUCP
id AA09765; Thu, 6 Apr 89 13:10:50 PDT
Received: from ozona.orc.olivetti.com by orc.olivetti.com (3.2/SMI-3.2)
id AA14856; Thu, 6 Apr 89 12:27:42 PDT
Received: by ozona.orc.olivetti.com (3.2/SMI-3.2)
id AA06558; Thu, 6 Apr 89 12:37:19 PDT
From: chase@orc.olivetti.com (David Chase)
Message-Id: <8904061937.AA06558@ozona.orc.olivetti.com>
To: nr@Princeton.EDU
Subject: Spideryweb bug report
Reply-To: David Chase <chase@orc.olivetti.com>
Date: Thu, 06 Apr 89 12:37:15 -0700
Status: RO
An installation problem: People who care about Trojan horses
don't put "." at the beginning of their path, so shell scripts
invoked as "make" never get executed. Try "./make" instead.
I realize that "." at front is the Unix default, but it is an
exceptionally stupid one (put a benign Trojan horse named "ls"
in a few world-writeable directories on a time-shared Unix machine,
and see what happens). I don't know why this isn't more widely
worried about.
David
From chase@orc.olivetti.com Thu Apr 6 16:12:03 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA24179; Thu, 6 Apr 89 16:12:01 EDT
Received: from NET.BIO.NET by Princeton.EDU (5.58+++/2.6)
id AA12883; Thu, 6 Apr 89 16:11:24 EDT
Received: from orc.olivetti.com by net.bio.net (5.59/1.15) with UUCP
id AA09777; Thu, 6 Apr 89 13:10:58 PDT
Received: from ozona.orc.olivetti.com by orc.olivetti.com (3.2/SMI-3.2)
id AA14962; Thu, 6 Apr 89 12:44:22 PDT
Received: by ozona.orc.olivetti.com (3.2/SMI-3.2)
id AA06693; Thu, 6 Apr 89 12:53:57 PDT
From: chase@orc.olivetti.com (David Chase)
Message-Id: <8904061953.AA06693@ozona.orc.olivetti.com>
To: nr@Princeton.EDU
Subject: That cute trick with '#' in variable definitions
Reply-To: David Chase <chase@orc.olivetti.com>
Date: Thu, 06 Apr 89 12:53:54 -0700
Status: RO
was unknown to me. I broke things badly "cleaning up" the
definition of the three directories. I think you ought
to either change the formatting, or mention that there is
a reason for the '#' immediately following the definitions
(it's not like I'm a novice at this, either)
David
From chase@orc.olivetti.com Thu Apr 6 16:12:13 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA24188; Thu, 6 Apr 89 16:12:10 EDT
Received: from NET.BIO.NET by Princeton.EDU (5.58+++/2.6)
id AA12886; Thu, 6 Apr 89 16:11:27 EDT
Received: from orc.olivetti.com by net.bio.net (5.59/1.15) with UUCP
id AA09786; Thu, 6 Apr 89 13:11:04 PDT
Received: from ozona.orc.olivetti.com by orc.olivetti.com (3.2/SMI-3.2)
id AA15001; Thu, 6 Apr 89 13:02:35 PDT
Received: by ozona.orc.olivetti.com (3.2/SMI-3.2)
id AA06741; Thu, 6 Apr 89 13:12:11 PDT
From: chase@orc.olivetti.com (David Chase)
Message-Id: <8904062012.AA06741@ozona.orc.olivetti.com>
To: nr@Princeton.EDU
Subject: So far, so good
Reply-To: David Chase <chase@orc.olivetti.com>
Date: Thu, 06 Apr 89 13:12:08 -0700
Status: RO
It made it past "make boot", and I'm fixing to look at
the documentation. My intention is to see if this can
easily be made to generate Modula-3 -- if so, (I think)
I can use it to generate test input for the Modula-3
compiler. Of course, any such test input is unlikely to
be incredibly sophisticated, since it will be machine-
generated, but it's better than none at all.
David
From nr Thu Apr 6 20:12:03 1989
Received: by notecnirp.Princeton.EDU (5.51/1.81)
id AA05087; Thu, 6 Apr 89 20:11:36 EDT
Date: Thu, 6 Apr 89 20:11:36 EDT
From: nr (Norman Ramsey)
Message-Id: <8904070011.AA05087@notecnirp.Princeton.EDU>
To: chase@orc.olivetti.com
Subject: Re: "cputype?"
Cc: nr
Status: RO
> Subject: "cputype?"
> is not a command on my Unix machine (a Sun).
>
> David
I have added instructions to README and to WebMakefile that deal with
cputype. As far as I know, it is a local idiosyncracy, and my
documentation predates it. Thank you for calling it to my attention.
It looks like you've already figured it out, but a shell script
containing the line `echo sun3' will do fine if it is somewhere on
your search path.
> An installation problem: People who care about Trojan horses
> don't put "." at the beginning of their path, so shell scripts
> invoked as "make" never get executed. Try "./make" instead.
I don't see a clean way to fix this. Are any files affected besides
WEBROOT/Makefile? The problem is that some of the calls to $(MAKE)
are calls to shell scripts in subdirectories, while others are calls
to /bin/make in the current directory. What have you done to improve
things?
> I realize that "." at front is the Unix default, but it is an
> exceptionally stupid one (put a benign Trojan horse named "ls"
> in a few world-writeable directories on a time-shared Unix machine,
> and see what happens). I don't know why this isn't more widely
> worried about.
I think this isn't worried about because most people assume the world
is benign until they are bitten once or twice. Some of my colleagues
swear by never putting . on their path at all. Me, I haven't been
bitten yet.
> Subject: That cute trick with '#' in variable definitions
> was unknown to me. I broke things badly "cleaning up" the
> definition of the three directories. I think you ought
> to either change the formatting, or mention that there is
> a reason for the '#' immediately following the definitions
> (it's not like I'm a novice at this, either)
I put a comment in. When I first prepared this for distribution, I
broke things badly by commenting those (previously uncommented) macro
definitions.
> It made it past "make boot", and I'm fixing to look at
> the documentation. My intention is to see if this can
> easily be made to generate Modula-3 -- if so, (I think)
> I can use it to generate test input for the Modula-3
> compiler. Of course, any such test input is unlikely to
> be incredibly sophisticated, since it will be machine-
> generated, but it's better than none at all.
Generating Modula-3 from a Modula-3 literate program should be no
trouble at all. One the other hand, if you want to translate
something else into Modula-3, you are probably better off using
WEB-to-C as a basis. Let me know how it goes; I would love to have a
Modula-3 spider file to add to the distribution.
Norman
From Chris.Paris@vega.fac.cs.cmu.edu Mon Jan 23 20:52:57 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.68)
id AA03118; Mon, 23 Jan 89 20:52:56 EST
Received: from VEGA.FAC.CS.CMU.EDU by Princeton.EDU (5.58+++/1.98)
id AA27627; Mon, 23 Jan 89 20:52:44 EST
Message-Id: <8901240152.AA27627@Princeton.EDU>
Received: from VEGA.FAC.CS.CMU.EDU by VEGA.FAC.CS.CMU.EDU; 23 Jan 89 20:51:40 EST
To: nr@Princeton.EDU
Reply-To: cap@cs.cmu.edu (Chris Paris)
Subject: webkernel
Date: Mon, 23 Jan 89 20:51:36 EST
From: Chris.Paris@VEGA.FAC.CS.CMU.EDU
Status: RO
I would be more than happy to help beta test Spider. I think it is a
wonderful idea that seems very well implimented. I installed the
webkernel you sent me (thanks), and it fixed most problems I was
having. However, when ceeweave->TeX comes across something like,
@u
#include <stdio.h>
#include <fcntl.h>
#include "myinclude.h"
main()
things happen that I wouldn't expect. First, the filenames in angle
brackets get set in italics without the brackets. I wouldn't expect
this because it looks like c.spider has code to recognize and put in
brackets. "myinclude.h" is set in \tt with the quotes, which is what
I would expect.
Second, if the first line of code is a preprocessor directive, it is
indented, so that it lines up with main(). Subsequent directives are
against the left margin.
I don't want to call these bugs since I don't know if what I'm seeing
is what you intended or not. I am testing this on a Sun 3/60 running
Mach (4.3 BSD superset), using TeX 2.9 (generated by web2c). I can
also test on Vaxen and IBM RT's, but have not done so yet. I'm
willing to help out with this any way I can as long as I don't get too
sidetracked from my regular work. Thanks for your help.
/cap
From nr Tue Jan 24 12:41:32 1989
Received: by notecnirp.Princeton.EDU (5.51/1.68)
id AA24196; Tue, 24 Jan 89 12:41:30 EST
Date: Tue, 24 Jan 89 12:41:30 EST
From: nr (Norman Ramsey)
Message-Id: <8901241741.AA24196@notecnirp.Princeton.EDU>
To: cap.cs.cmu.edu
Subject: Bugs
Cc: nr
Status: RO
> I would be more than happy to help beta test Spider. I think it is a
> wonderful idea that seems very well implimented.
I'm glad you think so. I myself have some dissatisfactions with the
implementation, especially with the webkernel macros. I hope to have
time to work them out this summer.
> I installed the
> webkernel you sent me (thanks), and it fixed most problems I was
> having. However, when ceeweave->TeX comes across something like,
>
> @u
> #include <stdio.h>
> #include <fcntl.h>
> #include "myinclude.h"
>
> main()
>
> things happen that I wouldn't expect. First, the filenames in angle
> brackets get set in italics without the brackets. I wouldn't expect
> this because it looks like c.spider has code to recognize and put in
> brackets. "myinclude.h" is set in \tt with the quotes, which is what
> I would expect.
You found a bug in c.spider, which I have fixed. Generally, the way
to detect such a bug is to put an @2 in a very small test program, and
then look at the resulting diagnostic output. The numbers are numbers
of productions (from productions.list). Anyway I changed the
following production so that it wouldn't swallow the angle brackets::
preproc !(less|lesssimp|backslash|newline) --> preproc
> Second, if the first line of code is a preprocessor directive, it is
> indented, so that it lines up with main(). Subsequent directives are
> against the left margin.
A bug in Knuth's unfathomable macros. I have hacked webkernel and
just hope I haven't broken anything else.
> I don't want to call these bugs since I don't know if what I'm seeing
> is what you intended or not.
Not. I think my only nonstandard prettyprinting is of (old-style)
parameter declarations.
> I am testing this on a Sun 3/60 running
> Mach (4.3 BSD superset), using TeX 2.9 (generated by web2c). I can
> also test on Vaxen and IBM RT's, but have not done so yet.
You will have trouble using the makefiles on other machines---I
unknowingly used some features specific to Sun make (the @#$(&% man
page didn't say `warning, not portable'), so things like `make boot'
and `make distribution' may not work right. But `make weave' and
`make tangle' work fine on a VAX running BSD4.3.
> I'm
> willing to help out with this any way I can as long as I don't get too
> sidetracked from my regular work. Thanks for your help.
I'm looking for a guinea pig to try to write a Spider file for ANSI C.
Be aware that C is by far the most complicated language to prettyprint
(of the ones in the distribution).
Norman
From crm@summanulla.mc.duke.edu Fri Apr 7 21:29:18 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA14862; Fri, 7 Apr 89 21:29:16 EDT
Received: from duke.cs.duke.edu by Princeton.EDU (5.58+++/2.6)
id AA02957; Fri, 7 Apr 89 21:29:01 EDT
Received: from summanulla.mc.duke.edu by duke.cs.duke.edu (5.59/DUKE/08-19-88)
id AA01720; Fri, 7 Apr 89 21:31:47 EDT
Received: by summanulla.mc.duke.edu (3.2/DUKE/3-1-88)
id AA08029; Fri, 7 Apr 89 18:22:28 EDT
Date: Fri, 7 Apr 89 18:22:28 EDT
From: Charles R. Martin <crm@summanulla.mc.duke.edu>
Message-Id: <8904072222.AA08029@summanulla.mc.duke.edu>
To: nr@Princeton.EDU
Cc: crm@summanulla.mc.duke.edu
Subject: Spiders, eeek!
Status: RO
I got Spider over the wires a little while ago; I'm quite excited about
it, but I've had a little bit of trouble with the installation:
(1) I set up a cputype to echo sun3; when I do this, it creates a
subdirectory sun3 of master, and attempts to compile from there.
unfortunately, the objects aren't there, and so the compilation fails.
(2) compiling the Dijkstra version given a C compile error, with
duplicate labels in a case statement.
Sorry that I haven't gotten all the details of this, but its Friday
afternoon.
The compilation record of the dijkstra version is appended below for
your convenience, if that's the word.
echo "date" `date` | cat - d.spider | awk -f /usr/nbsr/crm/Spider/master/spider.awk
Warning: numeric constants and strings are identified in this WEAVE.
Warning: TeX strings have the same category as numeric constants in this WEAVE.
You used 3 translation keywords.
You defined 18 reserved words of 12 ilks.
You used 15 different categories in 14 productions.
The biggest production had 3 scraps on its left-hand side.
cat /usr/nbsr/crm/Spider/master/transcheck.list trans_keys.unsorted | awk -f /usr/nbsr/crm/Spider/master/transcheck.awk
awk -f /usr/nbsr/crm/Spider/master/cycle.awk < cycle.test
There can't possibly be a cycle in the graph
sort *.unsorted | awk -f /usr/nbsr/crm/Spider/master/nodups.awk
mv *web.tex /usr/nbsr/crm/lib/tex
/bin/rm -f tangle.web
ln /usr/nbsr/crm/Spider/master/tangle.web tangle.web
ceetangle -I/usr/nbsr/crm/Spider/master tangle
This is C TANGLE (generated at 6:13 PM on April 7, 1989)
*1*14*21*25*34*62*64*84*92*107*131*141
Writing the output files: (tangle.c).....500.....1000.....1500
Done.
(No errors were found.)
cc -DDEBUG -g -DSTAT -c tangle.c
"tangle.web", line 838: duplicate case in switch, 10
*** Error code 1
Stop.
*** Error code 1
From nr Sun Apr 9 22:24:29 1989
Received: by notecnirp.Princeton.EDU (5.51/1.81)
id AA04177; Sun, 9 Apr 89 22:24:06 EDT
Date: Sun, 9 Apr 89 22:24:06 EDT
From: nr (Norman Ramsey)
Message-Id: <8904100224.AA04177@notecnirp.Princeton.EDU>
To: crm@summanulla.mc.duke.edu
Subject: Re: Spiders, eeek!
Cc: nr
Status: RO
From crm@summanulla.mc.duke.edu Sat Apr 8 20:31:56 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA10629; Sat, 8 Apr 89 20:31:53 EDT
Received: from duke.cs.duke.edu by Princeton.EDU (5.58+++/2.6)
id AA28812; Sat, 8 Apr 89 20:31:39 EDT
Received: from summanulla.mc.duke.edu by duke.cs.duke.edu (5.59/DUKE/08-19-88)
id AA17447; Sat, 8 Apr 89 20:34:46 EDT
Received: by summanulla.mc.duke.edu (3.2/DUKE/3-1-88)
id AA09036; Sat, 8 Apr 89 20:31:21 EDT
Date: Sat, 8 Apr 89 20:31:21 EDT
From: Charles R. Martin <crm@summanulla.mc.duke.edu>
Message-Id: <8904090031.AA09036@summanulla.mc.duke.edu>
To: nr@Princeton.EDU
In-Reply-To: <8904081713.AA03350@notecnirp.Princeton.EDU> "nr@Princeton.EDU"
Subject: Spiders, eeek!
Got the patches, thanks. They appear to be compiling fine, although
I've uncovered another minor bug in the makefile: when you make clean,
it mashes c/tangle.c and awk/tangle.c, which are needed for compilation.
I'll look into the dijkstra thing first of next week.
Thanks again!
That is a Feature. If you've lost them you should be able to get them back
using `make source'. (Once you've done a `make boot', of course.)
Norman
PS Dijkstra compiles for me now.
From crm@harahan.mc.duke.edu Mon Apr 10 10:19:15 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA15358; Mon, 10 Apr 89 10:19:13 EDT
Received: from duke.cs.duke.edu by Princeton.EDU (5.58+++/2.6)
id AA10282; Mon, 10 Apr 89 10:18:38 EDT
Received: from nbsrws9.mc.duke.edu by duke.cs.duke.edu (5.59/DUKE/08-19-88)
id AA24403; Mon, 10 Apr 89 10:21:33 EDT
Received: by harahan.mc.duke.edu (3.2/DUKE/3-1-88)
id AA02511; Mon, 10 Apr 89 10:18:08 EDT
Date: Mon, 10 Apr 89 10:18:08 EDT
From: Charles R. Martin <crm@harahan.mc.duke.edu>
Message-Id: <8904101418.AA02511@harahan.mc.duke.edu>
To: nr@Princeton.EDU
In-Reply-To: <8904100224.AA04177@notecnirp.Princeton.EDU> "nr@Princeton.EDU"
Subject: Spiders, eeek!
Status: RO
Date: Sun, 9 Apr 89 22:24:06 EDT
From: nr@Princeton.EDU (Norman Ramsey)
From crm@summanulla.mc.duke.edu Sat Apr 8 20:31:56 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA10629; Sat, 8 Apr 89 20:31:53 EDT
Received: from duke.cs.duke.edu by Princeton.EDU (5.58+++/2.6)
id AA28812; Sat, 8 Apr 89 20:31:39 EDT
Received: from summanulla.mc.duke.edu by duke.cs.duke.edu (5.59/DUKE/08-19-88)
id AA17447; Sat, 8 Apr 89 20:34:46 EDT
Received: by summanulla.mc.duke.edu (3.2/DUKE/3-1-88)
id AA09036; Sat, 8 Apr 89 20:31:21 EDT
Date: Sat, 8 Apr 89 20:31:21 EDT
From: Charles R. Martin <crm@summanulla.mc.duke.edu>
Message-Id: <8904090031.AA09036@summanulla.mc.duke.edu>
To: nr@Princeton.EDU
In-Reply-To: <8904081713.AA03350@notecnirp.Princeton.EDU> "nr@Princeton.EDU"
Subject: Spiders, eeek!
Got the patches, thanks. They appear to be compiling fine, although
I've uncovered another minor bug in the makefile: when you make clean,
it mashes c/tangle.c and awk/tangle.c, which are needed for compilation.
I'll look into the dijkstra thing first of next week.
Thanks again!
That is a Feature. If you've lost them you should be able to get them back
using `make source'. (Once you've done a `make boot', of course.)
Uh, I think one of us doesn't understand. I do make clean then make
boot, and get an error. I have to recover c/tangle.c and awk/tangle.c
from the tar file to get it to work.
Oh, wait -- I see. Now that I've got ceetangle, I can make source and
get tangle.c. Okay, in that case, how about having a make veryclean
that really cleans up everything, and have make clean make a
re-'make-boot'-able state? It is, however, a style question rather
than a function question at that point.
Norman
PS Dijkstra compiles for me now.
Thanks, me too. I haven't had a chance to look at the results, but it
does compile. (If I could only preview dvi files through my PC at home
as I do through my 3/60 at work....)
Thanks again,
Charlie Martin (...!mcnc!duke!crm, crm@summanulla.mc.duke.edu)
NBSR/Box 3709/Duke University Medical Center/Durham, NC 27710
From chase@orc.olivetti.com Mon Apr 10 12:31:21 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA21577; Mon, 10 Apr 89 12:31:20 EDT
Received: from NET.BIO.NET by Princeton.EDU (5.58+++/2.6)
id AA14387; Mon, 10 Apr 89 12:31:02 EDT
Received: from orc.olivetti.com by net.bio.net (5.61/1.15) with UUCP
id AA28032; Mon, 10 Apr 89 09:30:25 -0700
Received: from ozona.orc.olivetti.com by orc.olivetti.com (3.2/SMI-3.2)
id AA02330; Mon, 10 Apr 89 09:19:46 PDT
Received: by ozona.orc.olivetti.com (3.2/SMI-3.2)
id AA02170; Mon, 10 Apr 89 09:29:22 PDT
From: chase@orc.olivetti.com (David Chase)
Message-Id: <8904101629.AA02170@ozona.orc.olivetti.com>
To: nr@Princeton.EDU (Norman Ramsey)
Reply-To: David Chase <chase@orc.olivetti.com>
Subject: Re: "cputype?"
In-Reply-To: Your message of Thu, 06 Apr 89 20:11:36 -0400.
<8904070011.AA05087@notecnirp.Princeton.EDU>
Date: Mon, 10 Apr 89 09:29:18 -0700
Status: RO
>> invoked as "make" never get executed. Try "./make" instead.
>I don't see a clean way to fix this. Are any files affected besides
WEBROOT/Makefile? The problem is that some of the calls to $(MAKE)
are calls to shell scripts in subdirectories, while others are calls
to /bin/make in the current directory. What have you done to improve
things?
It seemed to compile after I changed Makefile in the top-level
directory to say "./make", but I just now tried a "make -n clean"
and found a few missing things. I'd suggest that in the case where
you want "make" to mean "/bin/make" that you just drop in a shell
script along the lines of
/bin/make $*
There's a fair chance that I'll be able to translate Pascal into
Modula-3 with a little assistance. Another worthy project would
be to get a dialect of Pascal output more acceptable to the
brain-dead Pascal compilers used on Olivetti machines.
David
From simpson%trwarcadia.UUCP@oberon.usc.edu Mon Apr 10 14:16:57 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA07529; Mon, 10 Apr 89 14:16:53 EDT
Received: from OBERON.USC.EDU by Princeton.EDU (5.58+++/2.6)
id AA17855; Mon, 10 Apr 89 14:16:35 EDT
Received: by oberon.usc.edu (5.59/5.5) id AA01417;
Mon, 10 Apr 89 11:15:42 PST
Received: from localhost by trwarcadia.uucp (3.2/SMI-3.2)
id AA22106; Mon, 10 Apr 89 10:55:03 PDT
Message-Id: <8904101755.AA22106@trwarcadia.uucp>
To: nr@Princeton.EDU
Subject: Figure 2 of "Building a Language-Independent WEB"
Date: Mon, 10 Apr 89 10:55:00 -0700
From: Scott Simpson <simpson%trwarcadia.UUCP@oberon.usc.edu>
Status: RO
I believe the line coming into xtangle.c from the right should be labeled
CTANGLE, not CWEAVE.
Scott Simpson, TRW
From nr Tue Apr 11 14:13:27 1989
Received: by notecnirp.Princeton.EDU (5.51/1.81)
id AA11976; Tue, 11 Apr 89 14:12:49 EDT
Date: Tue, 11 Apr 89 14:12:49 EDT
From: nr (Norman Ramsey)
Message-Id: <8904111812.AA11976@notecnirp.Princeton.EDU>
To: mackay@june.cs.washington.edu
Subject: Re: spiderweb copyright (last time??)
Cc: nr
Status: RO
> One last clarification. The question is bound to come up, especially
> from the Japanese, who are very sensitive about this.
>
> 1. Is it within your intentions in copyrighting this that a firm
> might develop proprietary software which in no way incorporates
> any part of spiderweb, but simply uses spiderweb as a development
> tool for internal documentation.
>
> 2. What about the proprietary publication of documented source
> which was produced with one of the language versions of spiderweb?
> (Again with the understanding that no part of spiderweb is included
> in that documentation.)
I personally would be happy with either of these uses of spiderweb,
but the decision is not entirely up to me. Spiderweb was developed
partly with government contract money, and is agreed to be released
``for research purposes only'' (whatever that means). I will have to
look into this and get back to you.
> -------------------------------------------------------------------------
> Now for some first impressions.
>
> You have already supplied the explanation of how to get around `cputype`
> in the new version (which I picked up yesterday).
Yes, this was a late-breaking compromise to deal with the heterogenous
processor environment here at Princeton. I hate it, but it seems to
get the job done.
>
> In WebMakefile, the target boot: does not move the *.o files
> to the appropriate directory, they remain in the master directory.
Someone else found that too. I have patched the Makefile and added
some comments. I will send you patches. In the process, I broke the
Makefile to remove some of the sources. I think I have fixed that
now, but for about a day a bad version was on princeton.edu
>
> The weave output from ceetangle comes out perfectly, but the
> weave output from weave runs into problems when it includes grammar.web
>
> @ Here is where we define |highestposoverall| and where we
> check the productions.
> @d highestposoverall = 6
> @<Test for all of the productions@>=
> if ((1) &&
> (pp+1)->cat==SP_ignore_scrap) {
> /* 1: {\tt ? ignore_scrap --> #1} */
>
> This goes fine until it hits the comment line
>
> /* 1: {\tt ? ignore_scrap --> #1} */
> but then TeX is bothered by the _ and the #.
>
> What is needed is some sort of \ttverbatim after the {, and possibly an
> \endttverbatim before the } (I seem to remember that it can be
> difficult to get \ttverbatim to turn itself off when it drops to
> a lower level out of {} braces, but perhaps, since you are only
> dealing with one-line comments and there are no embedded newlines
> to be formatted, the difficulty can be got around.)
Actually a \ttverbatim kind of solution won't work, because
\ttverbatim needs to be able to change the catcodes, and they can't be
changed at that late date because the whole affair is an argument to
another macro, and the characeters have already been gobbled up (or
whatever the appropriate parts of TeX's anatomy that sets catcodes).
I have changed spider.web so the offending characters are escaped with
backslashes: {\tt ? ignore\_scrap --> \#1} and so on.
> The tangle for C seems to run with very satisfactory speed.
We have Don Knuth to thank for this. The lexer sees the code just
once, and then converts everything to either eight or sixteen bit
tokens. Output is very fast.
I would like to speed up WEAVE some day, by making it run from a table
(decision tree). Doing that and abandoning the internal conversion to
ASCII would probably gain a factor of three.
> Query? How does the Make variable $(SPIDER) with the equivalent
> any.spider get changed into the appropriate *.spider. It works, but
> I can't figure out how it works. Does "any" have some esoteric meaning
> to make?
This was a horrendous hack to be able to make many different WEBs
while keeping only one Makefile around. The three magic names
$(THETANGLE), $(THEWEAVE), and $(SPIDER) are all expected to be set on
the command line. (Perhaps I shouldn't set them at all inside
WebMakefile.) Look at ./c/make and you'll see how it works.
I am sending you a list of bugs so far and patches for them, under
separate cover, via tarmail.
Norman
From intvax!drstrip@unmvax.cs.unm.edu Tue Apr 11 12:02:41 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA02118; Tue, 11 Apr 89 12:02:39 EDT
Received: from unmvax.cs.unm.edu by Princeton.EDU (5.58+++/2.6)
id AA21790; Tue, 11 Apr 89 12:02:30 EDT
Received: from intvax.UUCP by unmvax.cs.unm.edu (5.61/3.1) with UUCP
id <AA17499@unmvax.cs.unm.edu>; Tue, 11 Apr 89 08:57:53 -0700
From: intvax!drstrip@unmvax.cs.unm.edu
Received: by intvax.LOCAL on Tue, 11 Apr 89 09:58:18 mdt
Date: Tue, 11 Apr 89 09:58:18 mdt
Message-Id: <8904111558.AA10373@intvax.LOCAL>
To: unmvax!nr@Princeton.EDU
Subject: spider
Status: RO
I was finally able to ftp the spider files. It was just a slow connection
that was fooling me. The webkernal file appears to have an extra carriage
return right after the "?" in the comment before you define a verbatim macro.
Also, in spiderwebman (I like that, also the ref. to Stan Lee), there is an
endnewstuff missing after the section on macros. (A lot is commented out in
the section, although not the endnewstuff, which just seems to be missing.)
Thanks for the contriution. I'll let you know if I apply it.
Strip
From ramsdell@linus.MITRE.ORG Mon Jun 5 15:02:30 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA01963; Mon, 5 Jun 89 15:02:27 EDT
Received: from MBUNIX.MITRE.ORG by Princeton.EDU (5.58+++/2.17)
id AA28417; Mon, 5 Jun 89 15:01:58 EDT
Posted-From: The MITRE Corp., Bedford, MA
X-Alternate-Route: user%node@mbunix.mitre.org
Return-Path: <ramsdell@linus.MITRE.ORG>
Received: from huxley.mitre.org by linus.MITRE.ORG (5.59/RCF-3S)
id AA20583; Mon, 5 Jun 89 14:59:51 EDT
Posted-Date: Mon, 5 Jun 89 15:00:16 EDT
Received: by huxley.mitre.org (4.0/RCF-4C)
id AA11117; Mon, 5 Jun 89 15:00:16 EDT
Date: Mon, 5 Jun 89 15:00:16 EDT
From: ramsdell@linus.MITRE.ORG
Message-Id: <8906051900.AA11117@huxley.mitre.org>
To: nr@Princeton.EDU
Subject: Spidery Scheme
Reply-To: ramsdell@MDF.mitre.org
Status: RO
I was playing with the idea of generating WEB for Scheme. There are
many problem, especially the fact that Scheme users like a pretty
printed format that seems not generatable by WEB's algorithm. While I
was playing, I found two bugs.
(1) In WebMakefile: the make command makes common.o and pathopen.o
even if they exist.
huxley% make
cc -DDEBUG -g -DSTAT -c /usr/src/local/tex/mitre/Spiderweb/master/common.c
mv common.o /usr/src/local/tex/mitre/Spiderweb/master/`arch`
cc -DDEBUG -g -DSTAT -c /usr/src/local/tex/mitre/Spiderweb/master/pathopen.c
mv pathopen.o /usr/src/local/tex/mitre/Spiderweb/master/`arch`
echo "date" `date` | cat - scheme.spider | awk -f /usr/src/local/tex/mitre/Spiderweb/master/spider.awk
Warning: numeric constants and strings are identified in this WEAVE.
awk: tokentest is not an array
record number 30
*** Error code 2
make: Fatal error: Command failed for target `grammar.web'
(2) Spider.awk fails as input to GNU's version of make:
huxley% echo "date" `date` | cat - scheme.spider | gawk -f /usr/src/local/tex/mitre/Spiderweb/master/spider.awk
gawk: syntax error near line 1221:
temp=sprintf"strncmp("%s",loc-1,%d)==0=0",$2,length($2)
^ parse error
The problem is gawk's sprintf expects a parenthesized argument list.
Using gawk is prefered because the error messages are better an Sun
awk does not always run spider.awk correctly. The input file
scheme.spider:
-------------
## A very broken attempt at scheme.
language Scheme extension scm
module definition exp use exp
# use as stmt is unavoidable since tangle introduces line breaks
comment begin <";"> end newline
line begin <";"-space-"line"> end <"">
default translation <*> mathness no
# identifiers are wrong -- no hope here.
token identifier category exp mathness yes
token number category exp mathness yes
token newline category newline translation <> mathness no
token pseudo_semi category semi mathness maybe translation <"\\relax">
semi <force> --> exp
token ( category open
token ) category close
#token . category binop translation <".\\,"-opt-3>
open exp --> call
call exp --> call
call close --> exp
#newline --> ignore_scrap
? ignore_scrap --> #1
-------------------
gives this output: (all is okay using gawk)
huxley% echo "date" `date` | cat - scheme.spider | awk -f /usr/src/local/tex/mitre/Spiderweb/master/spider.awk
Warning: numeric constants and strings are identified in this WEAVE.
awk: tokentest is not an array
record number 27
---------------------
Thank you for making your software available. I like Levy's CWEB and
am looking forward to using your version of CWEB.
John
From kademan@stat.wisc.edu Thu Jun 8 15:30:58 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA12073; Thu, 8 Jun 89 15:30:56 EDT
Received: from bayes.stat.wisc.edu by Princeton.EDU (5.58+++/2.17)
id AA00826; Thu, 8 Jun 89 15:30:47 EDT
Date: Thu, 8 Jun 89 14:28:47 CDT
From: kademan@stat.wisc.edu (Ed Kademan)
Message-Id: <8906081928.AA16941@bayes.stat.wisc.edu>
Received: by bayes.stat.wisc.edu; Thu, 8 Jun 89 14:28:47 CDT
To: nr@Princeton.EDU
Subject: spiderweb bug report
Status: RO
In case you haven't heard of this one yet, two of the line directives in
the file WEBROOT/master/common.c did not have any space between the number
and the file name string. GNU C would not compile it as a result. The
lines were numbers 168 and 170 I believe:
----------------------------------------------------------------------
#line 187"/u/nr/src/web/master/pathopen.web"
#line 188"/u/nr/src/web/master/pathopen.web"
----------------------------------------------------------------------
===> Bundled 11 Apr 89; all bugs into patches/003
From nr Sat Jun 17 11:02:26 1989
Received: by notecnirp.Princeton.EDU (5.51/1.81)
id AA00234; Sat, 17 Jun 89 11:02:25 EDT
Date: Sat, 17 Jun 89 11:02:25 EDT
From: nr (Norman Ramsey)
Message-Id: <8906171502.AA00234@notecnirp.Princeton.EDU>
To: ramsdell@linus.MITRE.ORG
Subject: Re: Spidery Scheme
Cc: nr
Status: RO
> From ramsdell@linus.MITRE.ORG Mon Jun 5 15:02:30 1989
> I was playing with the idea of generating WEB for Scheme. There are
> many problem, especially the fact that Scheme users like a pretty
> printed format that seems not generatable by WEB's algorithm.
What is the difficulty? Are there some lexical elements that WEB
can't recognize, or does one need semantic information to prettyprint
Scheme? I have only a nodding acquaintance with Lisp and know even
less about Scheme, but I shouldn't have expected too much difficulty.
> While I
> was playing, I found two bugs.
>
> (1) In WebMakefile: the make command makes common.o and pathopen.o
> even if they exist.
>
> huxley% make
> cc -DDEBUG -g -DSTAT -c /usr/src/local/tex/mitre/Spiderweb/master/common.c
> mv common.o /usr/src/local/tex/mitre/Spiderweb/master/`arch`
> cc -DDEBUG -g -DSTAT -c /usr/src/local/tex/mitre/Spiderweb/master/pathopen.c
> mv pathopen.o /usr/src/local/tex/mitre/Spiderweb/master/`arch`
> echo "date" `date` | cat - scheme.spider | awk -f /usr/src/local/tex/mitre/Spiderweb/master/spider.awk
> Warning: numeric constants and strings are identified in this WEAVE.
> awk: tokentest is not an array
> record number 30
> *** Error code 2
> make: Fatal error: Command failed for target `grammar.web'
The problem is in your use of `arch` and exposes a flaw in make. Make
is looking for a file common.o in a directory `arch` and not finding
it, so it makes the target. You can cure the problem by replacing
`arch` with $(ARCH) in the Makefile and using ARCH=`arch` in the make
script that calls /bin/make. I don't know of anything better.
> (2) Spider.awk fails as input to GNU's version of make:
>
> huxley% echo "date" `date` | cat - scheme.spider | gawk -f /usr/src/local/tex/mitre/Spiderweb/master/spider.awk
> gawk: syntax error near line 1221:
> temp=sprintf"strncmp("%s",loc-1,%d)==0=0",$2,length($2)
>
>
> ^ parse error
>
> The problem is gawk's sprintf expects a parenthesized argument list.
> Using gawk is prefered because the error messages are better an Sun
> awk does not always run spider.awk correctly.
I am reluctant to move to gawk because in the past I have found it
buggy and unstable. BSD awk is buggy but at least is stable.
Spider.awk contains a number of workarounds. I will look into the
tokentest problem.
> Thank you for making your software available. I like Levy's CWEB and
> am looking forward to using your version of CWEB.
> John
I'm glad to hear it. Sorry I took so long getting back to you; I've
been out of town and things piled up while I was away.
Norman
From nr Sat Jun 17 11:08:01 1989
Received: by notecnirp.Princeton.EDU (5.51/1.81)
id AA00397; Sat, 17 Jun 89 11:07:51 EDT
Date: Sat, 17 Jun 89 11:07:51 EDT
From: nr (Norman Ramsey)
Message-Id: <8906171507.AA00397@notecnirp.Princeton.EDU>
To: kademan@stat.wisc.edu
Subject: Re: spiderweb bug report
Cc: nr
Status: RO
I haven't heard of this one yet; thanks for the report. The problem is that
TANGLE tries to be clever about removing ``unnecessary'' spaces from its input.
The lines you found were from a .h file that was @included. Since I'm spending
my time writing new literate programming tools, I'm not going to attempt to fix
it. You can work around it by running the code through a sed script:
/^#line/s/"/ "/
Good luck.
Norman
From kademan@stat.wisc.edu Thu Jun 8 15:30:58 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA12073; Thu, 8 Jun 89 15:30:56 EDT
Received: from bayes.stat.wisc.edu by Princeton.EDU (5.58+++/2.17)
id AA00826; Thu, 8 Jun 89 15:30:47 EDT
Date: Thu, 8 Jun 89 14:28:47 CDT
From: kademan@stat.wisc.edu (Ed Kademan)
Message-Id: <8906081928.AA16941@bayes.stat.wisc.edu>
Received: by bayes.stat.wisc.edu; Thu, 8 Jun 89 14:28:47 CDT
To: nr@Princeton.EDU
Subject: spiderweb bug report
Status: RO
In case you haven't heard of this one yet, two of the line directives in
the file WEBROOT/master/common.c did not have any space between the number
and the file name string. GNU C would not compile it as a result. The
lines were numbers 168 and 170 I believe:
----------------------------------------------------------------------
#line 187"/u/nr/src/web/master/pathopen.web"
#line 188"/u/nr/src/web/master/pathopen.web"
----------------------------------------------------------------------
===> Bundled 11 Apr 89; all bugs into patches/003
From kademan@stat.wisc.edu Mon Jun 26 07:17:06 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA14563; Mon, 26 Jun 89 07:17:05 EDT
Received: from bayes.stat.wisc.edu by Princeton.EDU (5.58+++/2.17)
id AA27774; Mon, 26 Jun 89 07:16:24 EDT
Date: Mon, 26 Jun 89 06:14:15 CDT
From: kademan@stat.wisc.edu (Ed Kademan)
Message-Id: <8906261114.AA02589@bayes.stat.wisc.edu>
Received: by bayes.stat.wisc.edu; Mon, 26 Jun 89 06:14:15 CDT
To: nr@Princeton.EDU
Subject: spider bug report
Status: RO
===> Bundled 11 Apr 89; all bugs into patches/003
The webkernel.tex file has an \eject command on line 221 right after the
code that sets up an empty page for the first use of the output routine.
As a result the first "page" gets output before the regular macros get a
chance to set mark, and the section number in the first header is null.
Simply deleting that \eject command fixes the problem (and doesn't
introduce any new ones as far as I can tell.)
I've been having a good time playing with this spider system, and have
created a web for C++ by tweaking your c.spider file.
From matsl@inmic.se Tue May 23 11:11:17 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.81)
id AA14352; Tue, 23 May 89 11:11:15 EDT
Received: from [192.36.125.2] by Princeton.EDU (5.58+++/2.13)
id AA28056; Tue, 23 May 89 11:11:01 EDT
Received: from inmic.se by sunic.sunet.se (5.61+IDA/KTH/LTH/1.53)
id AAsunic04212; Tue, 23 May 89 17:11:18 +0200
Received: from haf2.inmic.se (ha2) by nmpcad.inmic.se (dec-1.2/3.0)
id AA14700; Tue, 23 May 89 17:08:19 -0200
Received: by haf2.inmic.se (hp-13.1/3.0)
id AA16364; Tue, 23 May 89 17:10:39 met
Date: Tue, 23 May 89 17:10:39 met
From: Mats Lidell <matsl@inmic.se>
Message-Id: <8905231510.AA16364@haf2.inmic.se>
To: nr@Princeton.EDU
In-Reply-To: Norman Ramsey's message of Mon, 22 May 89 11:18:05 EDT <8905221518.AA03626@notecnirp.Princeton.EDU>
Subject: Spiderweb
Status: RO
Dear Norman,
Thanks for your quick and helpful answer. It made me try it once again.
> I have only two guesses:
> -- you are somehow combining Spider with Silvio Levy's CWEB in a way
> that doesn't work
> -- you've got a buggy C compiler
Quite right. I was combining Spider with Silvio Levy's CWEB. See note
below.
> Please let me know more if you can, or at least tell me how big your
> tangle.c is, so I can tell if it makes sense.
This time I tried to follow the instructions real hard and it worked!
But I had some small problems.
When doing 'make boot' the link of ceetangle and ceeweave tries to get
the common object files from the cputype directory but they are not
there. They are compiled in the master directory! I just removed the
use of the cputype-directory and then it worked!
I also managed to destroy the tangle.c file in the master directory
when I typed 'make -p'. Well I shouldn't have done it but away it
went. Then I realised that this was what happened the last time I
tried to make spiderweb and that time I copied ctangle.c from CWEB
just to try it. Stupid me! This time I went back to my copy of the
distribution and got the real ctangle.c! The previous time I didn't
realised that it ever was in the master directory. I though it simply
was missing.
The programs are using the 'index' function that's not available on
SYSV. (I'm running HP-UX.) This should be substituted with 'strchr'
since I think that this is now normally available on both SYSV and BSD
systems. (I haven't checked that though! Maybe a macro is safer.) I
found no other system problem.
A small error when trying to print out the weave. I haven't tried to
find out why it fails. See output below.
ceeweave -I../master weave.web
This is C WEAVE (generated at 11:03 AM on May 23, 1989)
*1*14*28
! Illegal use of @ in comment. (l. 363)
/* identifier =200 or octal @'
310 */ *35*52*65*75*81*84*114*138*150*151*168*188*211*235
Writing the output file...*1*14*28
! Illegal use of @ in comment. (l. 363)
/* identifier =200 or octal @'
310 */ *35*52*65*75*81*84*114*138*150*151*168*188*211*235
Writing the index...Done.
Memory usage statistics: 722 of 3999 names, 2988 of 19999 cross-references,
9695 of 89999 bytes;
Parsing required 822 of 1000(950) scraps, 1736 of 2000(1950) texts,
3749 of 20000(19950) tokens, 258 of 399 levels;
Sorting required 47 levels
(Pardon me, but I think I spotted something wrong.)
I can't find any collection of the improvements and/or differences you
have added to your weave and tangle nor can I find any users manual in
the same way as for CWEB. Well I will start looking through the
program documentation but if you have anything better I would
appreciate that.
Many thanks.
Yours matsl
---
Mats Lidell
Swedish Institute of Microelectronics, VHDL CAD Tools,
PO Box 1084, S-164 21 KISTA, SWEDEN
Tel: +46 8 752 11 42 Ttx: 128 75 INMIC S Fax: +46 8 750 80 56
Internet: matsl@inmic.se or {uunet,unido,mcvax,ukc,munnari}sunic!inmic.se!matsl
From campbell@vx2.GBA.NYU.EDU Sat Jul 1 18:34:13 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.82)
id AA13480; Sat, 1 Jul 89 18:34:12 EDT
Received: from VX2.GBA.NYU.EDU by Princeton.EDU (5.58+++/2.19)
id AA22478; Sat, 1 Jul 89 18:34:04 EDT
Received: by vx2.GBA.NYU.EDU (5.61/1.34)
id AA25315; Sat, 1 Jul 89 17:35:25 -0500
Date: Sat, 1 Jul 89 17:35:25 -0500
From: campbell@vx2.GBA.NYU.EDU (bruce dietrich-campbell)
Message-Id: <8907012235.AA25315@vx2.GBA.NYU.EDU>
To: nr@Princeton.EDU
Subject: spider installation on 3b1
Status: RO
Hi,
I've just installed spider on my ATT 3b1 (aka UnixPC). Thought you
might be interested in a few minor changes I had to make.
1. In common.c I added the definition
#define index strchr
since the routine is named differently on SysV machines.
I probably should have added a -DUSG compilation flag, but
since this was the only dependency ...
2. In spider.awk, three sprintf lines were missing the
surrounding parentheses:
1221c1221
< temp=sprintf"strncmp(\"%s\",loc-1,%d)==0",$2,length($2)
---
> temp=sprintf("strncmp(\"%s\",loc-1,%d)==0",$2,length($2))
1231c1231
< temp=sprintf"'%s'",$2
---
> temp=sprintf("'%s'",$2)
3040c3040
< temp=sprintf"(pp+%d)->cat",$i-1
---
> temp=sprintf("(pp+%d)->cat",$i-1)
This was confusing, since BSD4.3 awk doesn't mind.
3. My awk then wouldn't digest c.spider or awk.spider,
complaining of an
awk : unexpected break, continue or next at record ###
where ### was one more than the number of lines in c.spider
or awk.spider. Rather than fight it, I installed gawk2.10
and everything went fine. (Note that gawk also burps on
the missing parentheses mentioned in 2 above.)
The last line of BUGS is:
===> Bundled 11 Apr 89; all bugs into patches/003
Cheers!
.............................................................................
Bruce Dietrich-Campbell ARPA: campbell@vx2.gba.nyu.edu
USENET: ...!{uunet,rocky,harvard}!cmcl2!vx2!campbell
From purtill@math.mit.edu Thu Jul 20 18:19:07 1989
Received: from princeton.Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.83)
id AA19356; Thu, 20 Jul 89 18:19:05 EDT
Received: from BOURBAKI.MIT.EDU by Princeton.EDU (5.58+++/2.20)
id AA27225; Thu, 20 Jul 89 18:18:47 EDT
Received: from jacobi.mit.edu by math.mit.edu; Thu, 20 Jul 89 18:18:32 EDT
Received: by jacobi.mit.edu; Thu, 20 Jul 89 18:18:23 EDT
Date: Thu, 20 Jul 89 18:18:23 EDT
From: purtill@math.mit.edu
Message-Id: <8907202218.AA05761@jacobi.mit.edu>
To: nr@Princeton.EDU (Norman Ramsey)
Subject: spider bug(?)
Status: R
If foo.web is:
----------
@* Oink.
@<Oink |#include|s@>=
#include <oink.h>
----------
Then foo.tex (produced by ceeweave) is:
----------
\input cweb.tex
\N1. Oink.
\Y\P\4\X1:Oink s\X${}\S{}$\par
\fi
\inx
\:\\{include}, 1.
\:\\{oink}, 1.
\fin
\:\X1:Oink s\X
\con
----------
Notice that the module name which should be "<Oink #includes>"
cleverly formated ends up being just "<Oink s>". (Also, I'm no longer
using gawk!)
^.-.^ Mark Purtill purtill@math.mit.edu (617)623-6238 - H
((")) Dept. of Math, MIT 2-229, Cambridge, MA 02139 (617)253-1589 - O
From nr Thu Jul 20 18:43:45 1989
Received: by notecnirp.Princeton.EDU (5.51/1.83)
id AA19658; Thu, 20 Jul 89 18:43:44 EDT
Date: Thu, 20 Jul 89 18:43:44 EDT
From: nr (Norman Ramsey)
Message-Id: <8907202243.AA19658@notecnirp.Princeton.EDU>
To: purtill@math.mit.edu
Subject: Re: spider bug(?)
Cc: nr
Status: R
This is a bug. A production is matching a token that isn't
there, and for some reason this is making WEAVE drop all its
text. I haven't found a quick workaround; you'll have to put
something else in that title (it needs a newline to terminate
the #include, and it can never get one within @<...@>).
I'll let you know when I get the bug fixed.
Norman
From alexande@cs.unc.edu Fri Jan 19 17:52:39 1990
Received: by cs.Princeton.EDU (5.57/1.98)
id AA05330; Fri, 19 Jan 90 17:52:38 EST
Received: from Princeton.EDU by notecnirp.Princeton.EDU (5.51/1.98)
id AA08642; Fri, 19 Jan 90 17:52:10 EST
Received: from mcnc.mcnc.org by Princeton.EDU (5.58+++/2.29/mailrelay)
id AA17810; Fri, 19 Jan 90 17:45:02 EST
Received: from mercury.cs.unc.edu by mcnc.mcnc.org (5.59/MCNC/5-16-88)
id AA21523; Fri, 19 Jan 90 17:43:28 EST
Received: from dopey.cs.unc.edu by mercury.cs.unc.edu (5.59/UNC/6-17-88)
id AA11354; Fri, 19 Jan 90 17:42:24 EST
Received: by dopey.cs.unc.edu (5.59/UNC/06-13-88)
id AA00405; Fri, 19 Jan 90 17:41:01 EST
Date: Fri, 19 Jan 90 17:41:01 EST
From: Geoffrey D. Alexander <alexande@cs.unc.edu>
Message-Id: <9001192241.AA00405@dopey.cs.unc.edu>
To: nr@Princeton.EDU
Subject: Problem installing spidery WEB
Cc: alexande@cs.unc.edu
Status: RO
Norman,
I have run into a problem installing Spidery WEB. The problem occur when I
try to run make boot from WEBROOT. Here is the output produced:
===============================================================================
cd c; make boot; cd ..
cd ../master; rm -f *.o; for i in /unc/alexande/spiderweb/master/common.c /unc/alexande/spiderweb/master/pathopen.c; do \
cc -DDEBUG -g -DSTAT -c $i; \
mv *.o /unc/alexande/spiderweb/master/sparc_sunos ; \
done; cd ../c
cc -DDEBUG -g -DSTAT -c tangle.c; \
cc -DDEBUG -g -DSTAT -o /unc/alexande/bin/sparc_sunos/ceetangle /unc/alexande/spiderweb/master/sparc_sunos/common.o /unc/alexande/spiderweb/master/sparc_sunos/pathopen.o tangle.o
ld: /unc/alexande/spiderweb/master/sparc_sunos/common.o: Not a directory
*** Error code 4
make: Fatal error: Command failed for target `boot'
Current working directory /tmp_mnt/auto/phi/phi2/unc/alexande/spiderweb/c
*** Error code 1
make: Fatal error: Command failed for target `boot'
===============================================================================
The problem is that there is no directory WEBROOT/master/sparc_sunos where
sparc_sunos is the value returned by cputype. I see that Spidery WEB is
distributed with null directories WEBROOT/master/sun3 and WEBROOT/master/vax.
Instead of "precreating" these null directories, why not dynamically create
them? Note that there wasn't anything in WEBROOT/README or
EBROOT/master/WebMake which indicated that cputype has to return either sun3
or vax (or that a null directory has to be created).
The last line of WEBROOT/BUGS is
===============================================================================
===> Bundled 29 Nov 89; all bugs into patches/008
===============================================================================
If you have any questions, please let me know.
Thanks,
Geoff
From nr Mon Apr 16 10:57:52 1990
Received: by cs.Princeton.EDU (5.57/1.100)
id AA08937; Mon, 16 Apr 90 10:57:34 EDT
Date: Mon, 16 Apr 90 10:57:34 EDT
From: Norman Ramsey <nr>
Message-Id: <9004161457.AA08937@cs.Princeton.EDU>
To: alexande@cs.unc.edu
Subject: Re: Problem installing spidery WEB
Cc: nr
Status: R
>
> Norman,
>
> I havd the following problems installing Spidery WEB:
>
> * I was unable to make web in the larch subdirectory.
> Error: "comment begin" must have a restricted translation
> Error: "line begin" must have a restricted translation
Fixed. You need <"%"> not % and <"%line"> not %line
> * I had two problems making web in the penelope subdirectory although I did
> get a tangle and weave wiich run. Why did I get a Fatal error from make
> (I believe it comes from /bin/make -f SpiderMakefile $*)?
Beats me.
> Why is there
> potential cycle error?
Cleverness about newlines in annotations. Context eliminates the
possibility of a cycle---check the productions.list file if you're not
clear about that.
> I recently started using Spidery WEB. I have encountered a few minor problems.
> The first problem is that I would like to use C code in a module name. This
> is illustrated by the following short example.
>
> ===============================================================================
> @*= Starred module with |C_code|.
This is broken just like anything else that changes catcodes in
arguments. It's a TeX problem that nobody knows how to fix.
> As a temporary soultion for using C code in module names, I tried using \it.
> This illustrated by
>
> ===============================================================================
> @*= Starred module with {\it C\_code}.
>
> @*= Index.
> ===============================================================================
>
> This didn't work. When I ran TeX, I got
> ......
> A solution which worked for me was to move \write\cont{\string... after
> \openout\cont=\contentsfile. This is similar to the code in CWEB's
> cwebmac.tex. Is this a good fix?
Looks good to me.
> This problem has to do with C preprocessor commands and the index. Consider
> the following short example.
>
> Ceeweave and TeX both run fine. However, the index contains entries for ifdef,
> include, and endif (in italics and without the #). I don't think preprocessor
> commands should be in the index (in any form). What do you think? How do I
> fix this?
>
> This problem invloves #include and the index. Consider the following short
> example.
>
> Both ceeweave and TeX run fine. However the index contains entries for test
> and it. It should contain instead an entry for test.it (or no entry). What
> do you think? How do I fix this?
You're not going to be able to do anything about this without
fundamentally changing Weave's idea of what an identifier is.
If you want you could make the preprocessor directives reserved words,
suppressing their appearance in the index, but that will have
unpleasant repercussions, I'm sure. If you really want to fix this
you'll have to do some hacking.
> This problem has to do with spacing in ANSI C function parameter
> specifications. Consider the following short example.
Nobody has written a Spider description for ANSI C that I am aware of.
If you care to write one I'll be happy to put it in the distribution.
> This problem has to do with the running head. Consider the following short
> example.
>
> ===============================================================================
> @*= Test of starred modules -- chapter.
>
> @*2 Test of starred modules -- subsection.
>
> @*4 Test of starred modules -- subsubsection.
>
> @*=Index.
> ===============================================================================
>
> Both ceeweave and TeX run fine. However, the running head on page 1 has module
> number 1 and the title for module 3. I believe that they should be consistent.
Fidget with \firstmark, \topmark, and all of their friends in
webkernel.tex. Let me know when you have something you're happy with.
> Actually, I would like to have only starred modules which cause page ejects be
> reflected in the running head. What do you think? How do I fix this?
Not a bad idea. Get hacking.
> This is not really a problem as much as a design question. I feel that @f
> should not result in any text in the TeX output (either in the module in
> which it occurs or in the index). @f is a directive to ceeweave; it does not
> contribute to understanding the C program. For example, if I use Xlib, I need
> to @f a number (20+) of indetifiers which are "typed" in the Xlib header files.
> I feel that having the @f's appear in a module (and in the index) simply
> detracts from the program. What do you think? How might I "fix" @f?
I think that if you're going to lie to your reader by using @f, your
reader should at least have a chance to catch you in the act. From
this you may infer that I never use @f.
Norman
From ndn@seg.npl.co.uk Thu Mar 29 04:58:29 1990
Received: by cs.Princeton.EDU (5.57/1.98)
id AA02242; Thu, 29 Mar 90 04:58:28 EST
Received: from mcsun.eu.net by Princeton.EDU (5.58+++/2.32/mailrelay)
id AA14282; Thu, 29 Mar 90 04:56:23 EST
Received: by mcsun.EU.net via EUnet; Thu, 29 Mar 90 11:57:25 +0200 (MET)
Received: from psg.npl.co.uk by kestrel.Ukc.AC.UK with UUCP id aa29895;
29 Mar 90 10:32 BST
Received: from guava.seg.npl.co.uk by snow.psg.npl.co.uk; Thu, 29 Mar 90 09:29:47 BST
From: Nick North <ndn@seg.npl.co.uk>
Date: Thu, 29 Mar 90 09:32:36 BST
Message-Id: <10449.9003290832@guava.seg.npl.co.uk>
To: nr@Princeton.EDU
Subject: Spiderweb bug
Status: RO
We are using the adaweave generated by Spiderweb and have run into
problems with the ** operator: the ada.spider supplied generates a
weave which turns
i := 3 ** Integer(p);
into
$\|i\mathbin{:=}\O{3}C\\{Integer}\ (\|p); \32$
So the ** has disappeared.
The following patch solves the problem (I don't know if it is the best
solution though):
*** ada.spider.old Wed Mar 28 11:46:50 1990
--- ada.spider Wed Mar 28 10:04:03 1990
***************
*** 46,52 ****
token => category arrow translation <"\\AR">
token .. category binop translation <"\\.{..}">
! token ** category binop
token := category binop translation <"\\mathbin{:=}">
token /= translation <"\\I"> category binop
token >= translation <"\\G"> category binop
--- 46,52 ----
token => category arrow translation <"\\AR">
token .. category binop translation <"\\.{..}">
! token ** category binop translation <"\\mathbin{**}">
token := category binop translation <"\\mathbin{:=}">
token /= translation <"\\I"> category binop
token >= translation <"\\G"> category binop
We are running the version of Spiderweb whose BUGS file ends with:
===> Bundled 11 Apr 89; all bugs into patches/003
Nick North
National Physical Laboratory, UK
From alexande@cs.unc.edu Tue Apr 24 11:26:22 1990
Received: by cs.Princeton.EDU (5.57/1.101)
id AA29083; Tue, 24 Apr 90 11:26:18 EDT
Received: from bashful.cs.unc.edu by mcnc.mcnc.org (5.59/MCNC/5-16-88)
id AA18202; Tue, 24 Apr 90 11:25:14 EDT
Received: from fillmore.cs.unc.edu by bashful.cs.unc.edu (5.61/UNC_02-28-90)
id AA21656; Tue, 24 Apr 90 11:24:49 -0400
Received: by fillmore.cs.unc.edu (5.61/UNC_02-28-90)
id AA10498; Tue, 24 Apr 90 11:24:40 -0400
Date: Tue, 24 Apr 90 11:24:40 -0400
From: Geoffrey D. Alexander <alexande@cs.unc.edu>
Message-Id: <9004241524.AA10498@fillmore.cs.unc.edu>
To: nr@cs
Subject: 3 more SpiderWEB problems
Cc: alexande@cs.unc.edu
Status: RO
I have run into three more Spidery WEB problems:
8. Page number may be off by one in table of contents. Illustrated by the
following example. Not that module 2 starts on page 2 -- table of contents
entry for module 2 gives page 1.
===============================================================================
@*= A Page Number Test.
Include a large amount of vertical space.
\vskip 6in
@*2 A level 2 module.
Include a large amount of vertical space.
\vskip 6in
@*= Index.
===============================================================================
9. Enums not formatted correctly by ceeweave. Illustrated by the following
example. I think enums should be formatted similar to structures. Also,
left arrows are not appropriate; I think a colon might be better. Finally,
enumerated values (false and true) should be underscored in index.
===============================================================================
@*= Test of enum.
@c
enum {
false=0,
true=1
} boolean;
@*= Index.
===============================================================================
10. Typedefs not formated correctly by ceeweave. Illustrated by the following
example. The new types (boolean, lstring_head, lstring, and string) should
be formatted as types (ie. in bold). I tried using @f to redefine them.
See second example. This caused there to be no line break between typedefs
and a small white space between the new type and ;.
===============================================================================
@*= Test of typedef.
@c
typedef enum {
@!false=0,
@!true=1
} boolean;
typedef struct {
int buf_len;
int cur_len;
} lstring_head;
typedef lstring_head *lstring;
typedef char *string;
@*= Index.
===============================================================================
===============================================================================
@*= Test of typedef.
@f boolean char
@f lstring_head char
@f lstring char
@f string char
@c
typedef enum {
@!false=0,
@!true=1
} boolean;
typedef struct {
int buf_len;
int cur_len;
} lstring_head;
typedef lstring_head *lstring;
typedef char *string;
@*= Index.
===============================================================================
The last line of the BUGS file is
==> Bundled 29 Nov 89; all bugs into patches/008
I think that problem 8 requires a change to webkernel.tex and that problems 9
and 10 reguire changes to the C definition source. I plan to look at problem
8 later this week. I'll take a look at problems 9 and 10 when I get around to
creating a Spidery WEB for ANSI C.
If you have any suggestions or fixes, please let me know.
Thanks,
Geoff Alexander
From nr Tue Apr 24 17:05:07 1990
Received: by cs.Princeton.EDU (5.57/1.101)
id AA08862; Tue, 24 Apr 90 17:04:56 EDT
Date: Tue, 24 Apr 90 17:04:56 EDT
From: Norman Ramsey <nr>
Message-Id: <9004242104.AA08862@cs.Princeton.EDU>
To: alexande@cs.unc.edu
Subject: Re: 3 more SpiderWEB problems
Cc: nr
Status: R
>
> I have run into three more Spidery WEB problems:
>
> 8. Page number may be off by one in table of contents.
This is a problem with the underlying TeX macros (marks, and so on).
I'll be delighted if you can find a fix.
> 9. Enums not formatted correctly by ceeweave.
enums are not K&R (old-style C). An ANSI C spider definition is badly
needed, but I don't have funding to produce one.
> 10. Typedefs not formated correctly by ceeweave.
Only if you believe ``correctly'' == ``what Silvio does.''
The problem is that the logical structure of typedefs follows the
structure of the C program, whereas the formatting is done on the
structure of the WEB source. There are nasty problems of scoping, and
even doing a botched job requires a two-pass algorithm.
> I tried using @f to redefine them.
> See second example. This caused there to be no line break between typedefs
> and a small white space between the new type and ;.
>
> ===============================================================================
> @*= Test of typedef.
>
> @f boolean char
> @f lstring_head char
> @f lstring char
> @f string char
This should be fixable by fiddling the c.spider definition; let me
know how you make out.
> I'll take a look at problems 9 and 10 when I get around to
> creating a Spidery WEB for ANSI C.
Sorry to be so unhelpful, but I have been putting my time into new,
better-designed tools, instead of continually patching web.
Norman
From alexande@cs.unc.edu Tue Apr 24 21:51:59 1990
Received: by cs.Princeton.EDU (5.57/1.101)
id AA11728; Tue, 24 Apr 90 21:51:55 EDT
Received: from bashful.cs.unc.edu by mcnc.mcnc.org (5.59/MCNC/5-16-88)
id AA00785; Tue, 24 Apr 90 21:50:54 EDT
Received: from fillmore.cs.unc.edu by bashful.cs.unc.edu (5.61/UNC_02-28-90)
id AA23752; Tue, 24 Apr 90 21:50:29 -0400
Received: by fillmore.cs.unc.edu (5.61/UNC_02-28-90)
id AA01306; Tue, 24 Apr 90 21:50:20 -0400
Date: Tue, 24 Apr 90 21:50:20 -0400
From: Geoffrey D. Alexander <alexande@cs.unc.edu>
Message-Id: <9004250150.AA01306@fillmore.cs.unc.edu>
To: nr@cs
Subject: Some Spidery WEB fixes
Cc: alexande@cs.unc.edu
Status: R
Norman,
I have fixed some of the Spidery WEB problem is snet you. First, a fix for the
"code in a module name" problem (this also allows italic text in a module
name). This fix involves two changes to webkernel.tex:
Initialize \DC:
===== old =====================================================================
\def\CD{\relax\ifmmode\let\DC\egroup\hbox\bgroup\else\let\DC\relax\fi}
===== new =====================================================================
\def\CD{\relax\ifmmode\let\DC\egroup\hbox\bgroup\else\let\DC\relax\fi}
\let\DC\relax
===============================================================================
Move the he code that writes "\catcode`@=11" to the toc file:
===== old =====================================================================
\newwrite\cont
\output{\setbox0=\page % the first page is garbage
\openout\cont=\contentsfile
\global\output{\normaloutput\page\lheader\rheader\lfooter\rfooter}}
\setpage
\vbox to \vsize{} % the first \topmark won't be null
% Delete as per bug report from kademan@stat.wisc.edu
% Causes headings on first page to be missing
% \eject
\write\cont{\string\catcode`\string\@=11}% a hack to make contents
% take stuff in \.{---}
===== new =====================================================================
\newwrite\cont
\output{\setbox0=\page % the first page is garbage
\openout\cont=\contentsfile
\write\cont{\string\catcode`\string\@=11} % a hack to make contents
% take stuff in \.{---}
\global\output{\normaloutput\page\lheader\rheader\lfooter\rfooter}}
\setpage
\vbox to \vsize{} % the first \topmark won't be null
% Delete as per bug report from kademan@stat.wisc.edu
% Causes headings on first page to be missing
% \eject
===============================================================================
Next, a fix for the "module name in running head" problem. This fix makes the
module name in the running head change only a "page eject" module is
encountered. This fix involves a a single change.
Move the code that sets \rhead from \N to the \headcheck.
=== old \N ====================================================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\edef\rhead{\uppercase{\ignorespaces\themodtitle}} % define running headline
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip
\Z{\theopen\relax
\themodtitle}{\modno}{\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
=== new \N (includes third fix) ===============================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip\Z{\theopen\relax
\themodtitle}{\modno}{\noexpand\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
===============================================================================
=== old \headcheck ============================================================
\def\headcheck#1#2\headcheck{%
\makethechar{#1}%
\def\theskipper{\vfil\penalty-100\vfilneg\vskip12ptminus3pt}%
% skip before new module
\def\theopen{}% opening skip in toc entry
\def\thetocskip{}% vertical skip before toc entry
\def\themodtitle{{#2}}
\ifnextchar={%
\def\theskipper{\vfil\eject}%
\canceltrue
\def\theopen{\bf}%
\def\thetocskip{\vskip3ptplus1in\penalty-100
\vskip0ptplus-1in}%
}{\ifnextchar1{%
\cancelfalse
\def\theskipper{\vfil\eject}%
\def\theopen{\hskip2em}%
}{\ifnextchar2{%
\cancelfalse
\def\theopen{\hskip2em}%
}{\ifnextchar3{%
\cancelfalse
\def\theskipper{\vfil\eject}%
\def\theopen{\hskip4em}%
}{\ifnextchar4{%
\cancelfalse
\def\theopen{\hskip4em}%
}{% else
\ifcancel\else
\def\theskipper{\vfil\eject}%
\fi
\cancelfalse
\def\themodtitle{#1{#2}}%
}}}}}%
\theskipper
}
=== new \headcheck ============================================================
\def\headcheck#1#2\headcheck{%
\makethechar{#1}%
\def\theskipper{\vfil\penalty-100\vfilneg\vskip12ptminus3pt}%
% skip before new module
\def\theopen{}% opening skip in toc entry
\def\thetocskip{}% vertical skip before toc entry
\def\themodtitle{{#2}}
\ifnextchar={%
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\canceltrue
\def\theopen{\bf}%
\def\thetocskip{\vskip3ptplus1in\penalty-100
\vskip0ptplus-1in}%
}{\ifnextchar1{%
\cancelfalse
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\def\theopen{\hskip2em}%
}{\ifnextchar2{%
\cancelfalse
\def\theopen{\hskip2em}%
}{\ifnextchar3{%
\cancelfalse
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\def\theopen{\hskip4em}%
}{\ifnextchar4{%
\cancelfalse
\def\theopen{\hskip4em}%
}{% else
\ifcancel\else
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\fi
\cancelfalse
\def\themodtitle{#1{#2}}%
}}}}}%
\theskipper
}
===============================================================================
Last, a fix for the "table of contents page number off by one" problem. This
invloves a single change to webkernel.tex:
Add \noexpand before \the\pageno in \N.
=== old \N ====================================================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\edef\rhead{\uppercase{\ignorespaces\themodtitle}} % define running headline
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip
\Z{\theopen\relax
\themodtitle}{\modno}{\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
=== new \N (includes second fix) ==============================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip\Z{\theopen\relax
\themodtitle}{\modno}{\noexpand\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
===============================================================================
Note that there are two distinct changes to \N (one for the second fix and one
for the third fix). Feel free to make the changes to the distributed
webkernel.tex. If you have any questions or you have problems with any of the
fixes, please let me know.
Geoff Alexander
From alexande@cs.unc.edu Tue Apr 24 21:51:59 1990
Received: by cs.Princeton.EDU (5.57/1.101)
id AA11728; Tue, 24 Apr 90 21:51:55 EDT
Received: from bashful.cs.unc.edu by mcnc.mcnc.org (5.59/MCNC/5-16-88)
id AA00785; Tue, 24 Apr 90 21:50:54 EDT
Received: from fillmore.cs.unc.edu by bashful.cs.unc.edu (5.61/UNC_02-28-90)
id AA23752; Tue, 24 Apr 90 21:50:29 -0400
Received: by fillmore.cs.unc.edu (5.61/UNC_02-28-90)
id AA01306; Tue, 24 Apr 90 21:50:20 -0400
Date: Tue, 24 Apr 90 21:50:20 -0400
From: Geoffrey D. Alexander <alexande@cs.unc.edu>
Message-Id: <9004250150.AA01306@fillmore.cs.unc.edu>
To: nr@cs
Subject: Some Spidery WEB fixes
Cc: alexande@cs.unc.edu
Status: RO
Norman,
I have fixed some of the Spidery WEB problem is snet you. First, a fix for the
"code in a module name" problem (this also allows italic text in a module
name). This fix involves two changes to webkernel.tex:
Initialize \DC:
===== old =====================================================================
\def\CD{\relax\ifmmode\let\DC\egroup\hbox\bgroup\else\let\DC\relax\fi}
===== new =====================================================================
\def\CD{\relax\ifmmode\let\DC\egroup\hbox\bgroup\else\let\DC\relax\fi}
\let\DC\relax
===============================================================================
Move the he code that writes "\catcode`@=11" to the toc file:
===== old =====================================================================
\newwrite\cont
\output{\setbox0=\page % the first page is garbage
\openout\cont=\contentsfile
\global\output{\normaloutput\page\lheader\rheader\lfooter\rfooter}}
\setpage
\vbox to \vsize{} % the first \topmark won't be null
% Delete as per bug report from kademan@stat.wisc.edu
% Causes headings on first page to be missing
% \eject
\write\cont{\string\catcode`\string\@=11}% a hack to make contents
% take stuff in \.{---}
===== new =====================================================================
\newwrite\cont
\output{\setbox0=\page % the first page is garbage
\openout\cont=\contentsfile
\write\cont{\string\catcode`\string\@=11} % a hack to make contents
% take stuff in \.{---}
\global\output{\normaloutput\page\lheader\rheader\lfooter\rfooter}}
\setpage
\vbox to \vsize{} % the first \topmark won't be null
% Delete as per bug report from kademan@stat.wisc.edu
% Causes headings on first page to be missing
% \eject
===============================================================================
Next, a fix for the "module name in running head" problem. This fix makes the
module name in the running head change only a "page eject" module is
encountered. This fix involves a a single change.
Move the code that sets \rhead from \N to the \headcheck.
=== old \N ====================================================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\edef\rhead{\uppercase{\ignorespaces\themodtitle}} % define running headline
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip
\Z{\theopen\relax
\themodtitle}{\modno}{\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
=== new \N (includes third fix) ===============================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip\Z{\theopen\relax
\themodtitle}{\modno}{\noexpand\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
===============================================================================
=== old \headcheck ============================================================
\def\headcheck#1#2\headcheck{%
\makethechar{#1}%
\def\theskipper{\vfil\penalty-100\vfilneg\vskip12ptminus3pt}%
% skip before new module
\def\theopen{}% opening skip in toc entry
\def\thetocskip{}% vertical skip before toc entry
\def\themodtitle{{#2}}
\ifnextchar={%
\def\theskipper{\vfil\eject}%
\canceltrue
\def\theopen{\bf}%
\def\thetocskip{\vskip3ptplus1in\penalty-100
\vskip0ptplus-1in}%
}{\ifnextchar1{%
\cancelfalse
\def\theskipper{\vfil\eject}%
\def\theopen{\hskip2em}%
}{\ifnextchar2{%
\cancelfalse
\def\theopen{\hskip2em}%
}{\ifnextchar3{%
\cancelfalse
\def\theskipper{\vfil\eject}%
\def\theopen{\hskip4em}%
}{\ifnextchar4{%
\cancelfalse
\def\theopen{\hskip4em}%
}{% else
\ifcancel\else
\def\theskipper{\vfil\eject}%
\fi
\cancelfalse
\def\themodtitle{#1{#2}}%
}}}}}%
\theskipper
}
=== new \headcheck ============================================================
\def\headcheck#1#2\headcheck{%
\makethechar{#1}%
\def\theskipper{\vfil\penalty-100\vfilneg\vskip12ptminus3pt}%
% skip before new module
\def\theopen{}% opening skip in toc entry
\def\thetocskip{}% vertical skip before toc entry
\def\themodtitle{{#2}}
\ifnextchar={%
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\canceltrue
\def\theopen{\bf}%
\def\thetocskip{\vskip3ptplus1in\penalty-100
\vskip0ptplus-1in}%
}{\ifnextchar1{%
\cancelfalse
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\def\theopen{\hskip2em}%
}{\ifnextchar2{%
\cancelfalse
\def\theopen{\hskip2em}%
}{\ifnextchar3{%
\cancelfalse
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\def\theopen{\hskip4em}%
}{\ifnextchar4{%
\cancelfalse
\def\theopen{\hskip4em}%
}{% else
\ifcancel\else
\def\theskipper{\vfil\eject%
\edef\rhead{\uppercase{\ignorespaces%
\themodtitle}}}%
\fi
\cancelfalse
\def\themodtitle{#1{#2}}%
}}}}}%
\theskipper
}
===============================================================================
Last, a fix for the "table of contents page number off by one" problem. This
invloves a single change to webkernel.tex:
Add \noexpand before \the\pageno in \N.
=== old \N ====================================================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\edef\rhead{\uppercase{\ignorespaces\themodtitle}} % define running headline
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip
\Z{\theopen\relax
\themodtitle}{\modno}{\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
=== new \N (includes second fix) ==============================================
\outer\def\N#1.#2.{\MN#1.\headcheck#2\headcheck
\message{*\modno} % progress report
\edef\next{\write\cont{\thetocskip\Z{\theopen\relax
\themodtitle}{\modno}{\noexpand\the\pageno}}}\next % to contents file
\ifon\startsection{\bf\ignorespaces\themodtitle.\quad}\ignorespaces}
===============================================================================
Note that there are two distinct changes to \N (one for the second fix and one
for the third fix). Feel free to make the changes to the distributed
webkernel.tex. If you have any questions or you have problems with any of the
fixes, please let me know.
Geoff Alexander